# QueryInst

Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22774;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 22759) END FROM WidgetInst WHERE WidgetInstId = 22759) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22777;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 22779) END FROM WidgetInst WHERE WidgetInstId = 22779) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22780;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22779) END FROM WidgetInst WHERE WidgetInstId = 22779) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22783;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 22759) END FROM WidgetInst WHERE WidgetInstId = 22759) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22786;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 22788) END FROM WidgetInst WHERE WidgetInstId = 22788) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22789;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22788) END FROM WidgetInst WHERE WidgetInstId = 22788) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22792;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 22788) END FROM WidgetInst WHERE WidgetInstId = 22788) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22795;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 22759) END FROM WidgetInst WHERE WidgetInstId = 22759) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22798;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 22759) END FROM WidgetInst WHERE WidgetInstId = 22759) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 22800) END FROM WidgetInst WHERE WidgetInstId = 22800)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22803;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 22802) END FROM WidgetInst WHERE WidgetInstId = 22802) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22806;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 22802) END FROM WidgetInst WHERE WidgetInstId = 22802) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22807;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 22802) END FROM WidgetInst WHERE WidgetInstId = 22802) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22810;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 22802) END FROM WidgetInst WHERE WidgetInstId = 22802) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22811;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 22759) END FROM WidgetInst WHERE WidgetInstId = 22759) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22800) END FROM WidgetInst WHERE WidgetInstId = 22800)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22812;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 22802) END FROM WidgetInst WHERE WidgetInstId = 22802) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22815;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 22802) END FROM WidgetInst WHERE WidgetInstId = 22802) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22816;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22818) END FROM WidgetInst WHERE WidgetInstId = 22818) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22819;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 22802) END FROM WidgetInst WHERE WidgetInstId = 22802) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22821;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 22802) END FROM WidgetInst WHERE WidgetInstId = 22802) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22822;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 22818) END FROM WidgetInst WHERE WidgetInstId = 22818) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22823;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 22802) END FROM WidgetInst WHERE WidgetInstId = 22802) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22825;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 22802) END FROM WidgetInst WHERE WidgetInstId = 22802) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22826;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 22759) END FROM WidgetInst WHERE WidgetInstId = 22759) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22827;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 22759) END FROM WidgetInst WHERE WidgetInstId = 22759) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22830;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22863) END FROM WidgetInst WHERE WidgetInstId = 22863) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22864;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22863) END FROM WidgetInst WHERE WidgetInstId = 22863) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22866;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22863) END FROM WidgetInst WHERE WidgetInstId = 22863) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22868;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 22759) END FROM WidgetInst WHERE WidgetInstId = 22759) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22870;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22879) END FROM WidgetInst WHERE WidgetInstId = 22879) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22880;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22879) END FROM WidgetInst WHERE WidgetInstId = 22879) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22882;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22879) END FROM WidgetInst WHERE WidgetInstId = 22879) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22884;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 22759) END FROM WidgetInst WHERE WidgetInstId = 22759) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22886;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22899) END FROM WidgetInst WHERE WidgetInstId = 22899) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22900;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22899) END FROM WidgetInst WHERE WidgetInstId = 22899) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22902;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22899) END FROM WidgetInst WHERE WidgetInstId = 22899) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22904;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 22759) END FROM WidgetInst WHERE WidgetInstId = 22759) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22906;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22919) END FROM WidgetInst WHERE WidgetInstId = 22919) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22920;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22919) END FROM WidgetInst WHERE WidgetInstId = 22919) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22922;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22919) END FROM WidgetInst WHERE WidgetInstId = 22919) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22924;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22925) END FROM WidgetInst WHERE WidgetInstId = 22925) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22919) END FROM WidgetInst WHERE WidgetInstId = 22919)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22926;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22925) END FROM WidgetInst WHERE WidgetInstId = 22925) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22919) END FROM WidgetInst WHERE WidgetInstId = 22919)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22928;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 22925) END FROM WidgetInst WHERE WidgetInstId = 22925) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 22919) END FROM WidgetInst WHERE WidgetInstId = 22919)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22930;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 22759) END FROM WidgetInst WHERE WidgetInstId = 22759) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22932;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 22934) END FROM WidgetInst WHERE WidgetInstId = 22934) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22935;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22934) END FROM WidgetInst WHERE WidgetInstId = 22934) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22938;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 22934) END FROM WidgetInst WHERE WidgetInstId = 22934) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22941;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 22934) END FROM WidgetInst WHERE WidgetInstId = 22934) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22952;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 22759) END FROM WidgetInst WHERE WidgetInstId = 22759) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22955;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 22958) END FROM WidgetInst WHERE WidgetInstId = 22958) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22959;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 22958) END FROM WidgetInst WHERE WidgetInstId = 22958) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22962;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 22958) END FROM WidgetInst WHERE WidgetInstId = 22958) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22965;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 22958) END FROM WidgetInst WHERE WidgetInstId = 22958) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22976;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 22980) END FROM WidgetInst WHERE WidgetInstId = 22980) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22981;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22980) END FROM WidgetInst WHERE WidgetInstId = 22980) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22983;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22980) END FROM WidgetInst WHERE WidgetInstId = 22980) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22985;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22980) END FROM WidgetInst WHERE WidgetInstId = 22980) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22987;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22980) END FROM WidgetInst WHERE WidgetInstId = 22980) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22989;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 22980) END FROM WidgetInst WHERE WidgetInstId = 22980) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22991;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 22759) END FROM WidgetInst WHERE WidgetInstId = 22759) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 18520) END FROM WidgetInst WHERE WidgetInstId = 18520)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22993;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 22995) END FROM WidgetInst WHERE WidgetInstId = 22995) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 22996;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 23000;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 23000;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 23000;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 23000;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 23000;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 23000;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 23000) END FROM WidgetInst WHERE WidgetInstId = 23000) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23001;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 23003) END FROM WidgetInst WHERE WidgetInstId = 23003) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23004;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 23000) END FROM WidgetInst WHERE WidgetInstId = 23000) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23006;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23016;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23019;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 23000) END FROM WidgetInst WHERE WidgetInstId = 23000) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23022;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23024) END FROM WidgetInst WHERE WidgetInstId = 23024) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23025;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23024) END FROM WidgetInst WHERE WidgetInstId = 23024) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23028;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 23000) END FROM WidgetInst WHERE WidgetInstId = 23000) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23031;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23033) END FROM WidgetInst WHERE WidgetInstId = 23033) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23034;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23033) END FROM WidgetInst WHERE WidgetInstId = 23033) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23037;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 23033) END FROM WidgetInst WHERE WidgetInstId = 23033) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23040;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 23000) END FROM WidgetInst WHERE WidgetInstId = 23000) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23043;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 23000) END FROM WidgetInst WHERE WidgetInstId = 23000) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23045) END FROM WidgetInst WHERE WidgetInstId = 23045)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23048;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23047) END FROM WidgetInst WHERE WidgetInstId = 23047) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23051;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23047) END FROM WidgetInst WHERE WidgetInstId = 23047) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23052;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23047) END FROM WidgetInst WHERE WidgetInstId = 23047) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23055;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23047) END FROM WidgetInst WHERE WidgetInstId = 23047) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23056;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 23000) END FROM WidgetInst WHERE WidgetInstId = 23000) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23045) END FROM WidgetInst WHERE WidgetInstId = 23045)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23057;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23047) END FROM WidgetInst WHERE WidgetInstId = 23047) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23060;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23047) END FROM WidgetInst WHERE WidgetInstId = 23047) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23061;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23063) END FROM WidgetInst WHERE WidgetInstId = 23063) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23064;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23047) END FROM WidgetInst WHERE WidgetInstId = 23047) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23066;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23047) END FROM WidgetInst WHERE WidgetInstId = 23047) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23067;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 23063) END FROM WidgetInst WHERE WidgetInstId = 23063) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23068;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23047) END FROM WidgetInst WHERE WidgetInstId = 23047) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23070;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23047) END FROM WidgetInst WHERE WidgetInstId = 23047) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23071;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 23000) END FROM WidgetInst WHERE WidgetInstId = 23000) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23072;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 23000) END FROM WidgetInst WHERE WidgetInstId = 23000) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23075;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23112) END FROM WidgetInst WHERE WidgetInstId = 23112) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23113;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23112) END FROM WidgetInst WHERE WidgetInstId = 23112) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23115;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23112) END FROM WidgetInst WHERE WidgetInstId = 23112) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23117;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 23000) END FROM WidgetInst WHERE WidgetInstId = 23000) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23119;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23132) END FROM WidgetInst WHERE WidgetInstId = 23132) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23133;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23132) END FROM WidgetInst WHERE WidgetInstId = 23132) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23135;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23132) END FROM WidgetInst WHERE WidgetInstId = 23132) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23137;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 23000) END FROM WidgetInst WHERE WidgetInstId = 23000) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23139;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23156) END FROM WidgetInst WHERE WidgetInstId = 23156) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23157;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23156) END FROM WidgetInst WHERE WidgetInstId = 23156) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23159;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23156) END FROM WidgetInst WHERE WidgetInstId = 23156) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23161;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 23000) END FROM WidgetInst WHERE WidgetInstId = 23000) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23163;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 23180) END FROM WidgetInst WHERE WidgetInstId = 23180) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23181;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 23180) END FROM WidgetInst WHERE WidgetInstId = 23180) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23183;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 23180) END FROM WidgetInst WHERE WidgetInstId = 23180) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23185;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23186) END FROM WidgetInst WHERE WidgetInstId = 23186) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 23180) END FROM WidgetInst WHERE WidgetInstId = 23180)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23187;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23186) END FROM WidgetInst WHERE WidgetInstId = 23186) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 23180) END FROM WidgetInst WHERE WidgetInstId = 23180)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23189;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23186) END FROM WidgetInst WHERE WidgetInstId = 23186) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 23180) END FROM WidgetInst WHERE WidgetInstId = 23180)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23191;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 23000) END FROM WidgetInst WHERE WidgetInstId = 23000) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23193;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23195) END FROM WidgetInst WHERE WidgetInstId = 23195) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23196;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23195) END FROM WidgetInst WHERE WidgetInstId = 23195) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23199;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 23195) END FROM WidgetInst WHERE WidgetInstId = 23195) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23202;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 23195) END FROM WidgetInst WHERE WidgetInstId = 23195) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23213;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 23000) END FROM WidgetInst WHERE WidgetInstId = 23000) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23216;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23223) END FROM WidgetInst WHERE WidgetInstId = 23223) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23224;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23223) END FROM WidgetInst WHERE WidgetInstId = 23223) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23227;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 23223) END FROM WidgetInst WHERE WidgetInstId = 23223) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23230;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 23223) END FROM WidgetInst WHERE WidgetInstId = 23223) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23241;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 23245) END FROM WidgetInst WHERE WidgetInstId = 23245) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23246;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 23245) END FROM WidgetInst WHERE WidgetInstId = 23245) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23248;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 23245) END FROM WidgetInst WHERE WidgetInstId = 23245) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23250;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 23245) END FROM WidgetInst WHERE WidgetInstId = 23245) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23252;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 23245) END FROM WidgetInst WHERE WidgetInstId = 23245) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23254;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 23245) END FROM WidgetInst WHERE WidgetInstId = 23245) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23256;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 23000) END FROM WidgetInst WHERE WidgetInstId = 23000) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 18520) END FROM WidgetInst WHERE WidgetInstId = 18520)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23258;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 23260) END FROM WidgetInst WHERE WidgetInstId = 23260) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23261;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 23265;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 23265;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 23265;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 23265;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 23265;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 23265;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 23265) END FROM WidgetInst WHERE WidgetInstId = 23265) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23266;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 23268) END FROM WidgetInst WHERE WidgetInstId = 23268) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23269;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 23265) END FROM WidgetInst WHERE WidgetInstId = 23265) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23271;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23281;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23284;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 23265) END FROM WidgetInst WHERE WidgetInstId = 23265) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23287;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23289) END FROM WidgetInst WHERE WidgetInstId = 23289) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23290;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23289) END FROM WidgetInst WHERE WidgetInstId = 23289) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23293;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 23265) END FROM WidgetInst WHERE WidgetInstId = 23265) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23296;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23298) END FROM WidgetInst WHERE WidgetInstId = 23298) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23299;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23298) END FROM WidgetInst WHERE WidgetInstId = 23298) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23302;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 23298) END FROM WidgetInst WHERE WidgetInstId = 23298) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23305;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 23265) END FROM WidgetInst WHERE WidgetInstId = 23265) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23308;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 23265) END FROM WidgetInst WHERE WidgetInstId = 23265) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23310) END FROM WidgetInst WHERE WidgetInstId = 23310)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23313;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23312) END FROM WidgetInst WHERE WidgetInstId = 23312) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23316;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23312) END FROM WidgetInst WHERE WidgetInstId = 23312) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23317;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23312) END FROM WidgetInst WHERE WidgetInstId = 23312) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23320;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23312) END FROM WidgetInst WHERE WidgetInstId = 23312) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23321;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 23265) END FROM WidgetInst WHERE WidgetInstId = 23265) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23310) END FROM WidgetInst WHERE WidgetInstId = 23310)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23322;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23312) END FROM WidgetInst WHERE WidgetInstId = 23312) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23325;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23312) END FROM WidgetInst WHERE WidgetInstId = 23312) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23326;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23328) END FROM WidgetInst WHERE WidgetInstId = 23328) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23329;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23312) END FROM WidgetInst WHERE WidgetInstId = 23312) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23331;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23312) END FROM WidgetInst WHERE WidgetInstId = 23312) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23332;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 23328) END FROM WidgetInst WHERE WidgetInstId = 23328) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23333;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23312) END FROM WidgetInst WHERE WidgetInstId = 23312) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23335;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23312) END FROM WidgetInst WHERE WidgetInstId = 23312) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23336;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 23265) END FROM WidgetInst WHERE WidgetInstId = 23265) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23337;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 23265) END FROM WidgetInst WHERE WidgetInstId = 23265) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23340;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23377) END FROM WidgetInst WHERE WidgetInstId = 23377) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23378;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23377) END FROM WidgetInst WHERE WidgetInstId = 23377) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23380;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23377) END FROM WidgetInst WHERE WidgetInstId = 23377) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23382;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 23265) END FROM WidgetInst WHERE WidgetInstId = 23265) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23384;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23397) END FROM WidgetInst WHERE WidgetInstId = 23397) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23398;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23397) END FROM WidgetInst WHERE WidgetInstId = 23397) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23400;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23397) END FROM WidgetInst WHERE WidgetInstId = 23397) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23402;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 23265) END FROM WidgetInst WHERE WidgetInstId = 23265) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23404;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23421) END FROM WidgetInst WHERE WidgetInstId = 23421) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23422;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23421) END FROM WidgetInst WHERE WidgetInstId = 23421) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23424;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23421) END FROM WidgetInst WHERE WidgetInstId = 23421) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23426;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 23265) END FROM WidgetInst WHERE WidgetInstId = 23265) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23428;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 23445) END FROM WidgetInst WHERE WidgetInstId = 23445) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23446;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 23445) END FROM WidgetInst WHERE WidgetInstId = 23445) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23448;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 23445) END FROM WidgetInst WHERE WidgetInstId = 23445) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23450;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23451) END FROM WidgetInst WHERE WidgetInstId = 23451) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 23445) END FROM WidgetInst WHERE WidgetInstId = 23445)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23452;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23451) END FROM WidgetInst WHERE WidgetInstId = 23451) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 23445) END FROM WidgetInst WHERE WidgetInstId = 23445)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23454;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23451) END FROM WidgetInst WHERE WidgetInstId = 23451) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 23445) END FROM WidgetInst WHERE WidgetInstId = 23445)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23456;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 23265) END FROM WidgetInst WHERE WidgetInstId = 23265) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23458;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23460) END FROM WidgetInst WHERE WidgetInstId = 23460) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23461;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23460) END FROM WidgetInst WHERE WidgetInstId = 23460) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23464;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 23460) END FROM WidgetInst WHERE WidgetInstId = 23460) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23467;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 23460) END FROM WidgetInst WHERE WidgetInstId = 23460) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23478;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 23265) END FROM WidgetInst WHERE WidgetInstId = 23265) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23481;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23488) END FROM WidgetInst WHERE WidgetInstId = 23488) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23489;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23488) END FROM WidgetInst WHERE WidgetInstId = 23488) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23492;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 23488) END FROM WidgetInst WHERE WidgetInstId = 23488) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23495;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 23488) END FROM WidgetInst WHERE WidgetInstId = 23488) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23506;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 23510) END FROM WidgetInst WHERE WidgetInstId = 23510) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23511;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 23510) END FROM WidgetInst WHERE WidgetInstId = 23510) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23513;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 23510) END FROM WidgetInst WHERE WidgetInstId = 23510) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23515;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 23510) END FROM WidgetInst WHERE WidgetInstId = 23510) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23517;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 23510) END FROM WidgetInst WHERE WidgetInstId = 23510) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23519;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 23510) END FROM WidgetInst WHERE WidgetInstId = 23510) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23521;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 23265) END FROM WidgetInst WHERE WidgetInstId = 23265) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 18520) END FROM WidgetInst WHERE WidgetInstId = 18520)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23523;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 23525) END FROM WidgetInst WHERE WidgetInstId = 23525) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23526;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 23530;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 23530;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 23530;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 23530;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 23530;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 23530;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 23530) END FROM WidgetInst WHERE WidgetInstId = 23530) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23531;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 23533) END FROM WidgetInst WHERE WidgetInstId = 23533) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23534;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 23530) END FROM WidgetInst WHERE WidgetInstId = 23530) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23536;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23546;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23549;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 23530) END FROM WidgetInst WHERE WidgetInstId = 23530) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23552;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23554) END FROM WidgetInst WHERE WidgetInstId = 23554) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23555;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23554) END FROM WidgetInst WHERE WidgetInstId = 23554) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23558;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 23530) END FROM WidgetInst WHERE WidgetInstId = 23530) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23561;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23563) END FROM WidgetInst WHERE WidgetInstId = 23563) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23564;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23563) END FROM WidgetInst WHERE WidgetInstId = 23563) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23567;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 23563) END FROM WidgetInst WHERE WidgetInstId = 23563) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23570;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 23530) END FROM WidgetInst WHERE WidgetInstId = 23530) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23573;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 23530) END FROM WidgetInst WHERE WidgetInstId = 23530) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23575) END FROM WidgetInst WHERE WidgetInstId = 23575)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23578;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23577) END FROM WidgetInst WHERE WidgetInstId = 23577) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23581;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23577) END FROM WidgetInst WHERE WidgetInstId = 23577) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23582;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23577) END FROM WidgetInst WHERE WidgetInstId = 23577) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23585;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23577) END FROM WidgetInst WHERE WidgetInstId = 23577) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23586;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 23530) END FROM WidgetInst WHERE WidgetInstId = 23530) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23575) END FROM WidgetInst WHERE WidgetInstId = 23575)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23587;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23577) END FROM WidgetInst WHERE WidgetInstId = 23577) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23590;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23577) END FROM WidgetInst WHERE WidgetInstId = 23577) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23591;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23593) END FROM WidgetInst WHERE WidgetInstId = 23593) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23594;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23577) END FROM WidgetInst WHERE WidgetInstId = 23577) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23596;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23577) END FROM WidgetInst WHERE WidgetInstId = 23577) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23597;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 23593) END FROM WidgetInst WHERE WidgetInstId = 23593) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23598;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23577) END FROM WidgetInst WHERE WidgetInstId = 23577) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23600;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23577) END FROM WidgetInst WHERE WidgetInstId = 23577) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23601;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 23530) END FROM WidgetInst WHERE WidgetInstId = 23530) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23602;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 23530) END FROM WidgetInst WHERE WidgetInstId = 23530) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23605;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23642) END FROM WidgetInst WHERE WidgetInstId = 23642) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23643;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23642) END FROM WidgetInst WHERE WidgetInstId = 23642) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23645;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23642) END FROM WidgetInst WHERE WidgetInstId = 23642) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23647;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 23530) END FROM WidgetInst WHERE WidgetInstId = 23530) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23649;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23662) END FROM WidgetInst WHERE WidgetInstId = 23662) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23663;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23662) END FROM WidgetInst WHERE WidgetInstId = 23662) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23665;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23662) END FROM WidgetInst WHERE WidgetInstId = 23662) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23667;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 23530) END FROM WidgetInst WHERE WidgetInstId = 23530) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23669;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23686) END FROM WidgetInst WHERE WidgetInstId = 23686) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23687;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23686) END FROM WidgetInst WHERE WidgetInstId = 23686) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23689;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23686) END FROM WidgetInst WHERE WidgetInstId = 23686) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23691;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 23530) END FROM WidgetInst WHERE WidgetInstId = 23530) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23693;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 23710) END FROM WidgetInst WHERE WidgetInstId = 23710) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23711;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 23710) END FROM WidgetInst WHERE WidgetInstId = 23710) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23713;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 23710) END FROM WidgetInst WHERE WidgetInstId = 23710) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23715;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23716) END FROM WidgetInst WHERE WidgetInstId = 23716) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 23710) END FROM WidgetInst WHERE WidgetInstId = 23710)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23717;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23716) END FROM WidgetInst WHERE WidgetInstId = 23716) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 23710) END FROM WidgetInst WHERE WidgetInstId = 23710)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23719;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23716) END FROM WidgetInst WHERE WidgetInstId = 23716) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 23710) END FROM WidgetInst WHERE WidgetInstId = 23710)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23721;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 23530) END FROM WidgetInst WHERE WidgetInstId = 23530) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23723;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23725) END FROM WidgetInst WHERE WidgetInstId = 23725) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23726;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23725) END FROM WidgetInst WHERE WidgetInstId = 23725) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23729;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 23725) END FROM WidgetInst WHERE WidgetInstId = 23725) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23732;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 23725) END FROM WidgetInst WHERE WidgetInstId = 23725) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23743;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 23530) END FROM WidgetInst WHERE WidgetInstId = 23530) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23746;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23753) END FROM WidgetInst WHERE WidgetInstId = 23753) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23754;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23753) END FROM WidgetInst WHERE WidgetInstId = 23753) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23757;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 23753) END FROM WidgetInst WHERE WidgetInstId = 23753) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23760;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 23753) END FROM WidgetInst WHERE WidgetInstId = 23753) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23771;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 23775) END FROM WidgetInst WHERE WidgetInstId = 23775) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23776;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 23775) END FROM WidgetInst WHERE WidgetInstId = 23775) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23778;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 23775) END FROM WidgetInst WHERE WidgetInstId = 23775) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23780;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 23775) END FROM WidgetInst WHERE WidgetInstId = 23775) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23782;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 23775) END FROM WidgetInst WHERE WidgetInstId = 23775) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23784;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 23775) END FROM WidgetInst WHERE WidgetInstId = 23775) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23786;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 23530) END FROM WidgetInst WHERE WidgetInstId = 23530) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 18520) END FROM WidgetInst WHERE WidgetInstId = 18520)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23788;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 23790) END FROM WidgetInst WHERE WidgetInstId = 23790) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23791;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 23795;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 23795;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 23795;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 23795;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 23795;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 23795;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 23795) END FROM WidgetInst WHERE WidgetInstId = 23795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23796;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 23798) END FROM WidgetInst WHERE WidgetInstId = 23798) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23799;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 23795) END FROM WidgetInst WHERE WidgetInstId = 23795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23801;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23811;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23814;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 23795) END FROM WidgetInst WHERE WidgetInstId = 23795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23817;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23819) END FROM WidgetInst WHERE WidgetInstId = 23819) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23820;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23819) END FROM WidgetInst WHERE WidgetInstId = 23819) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23823;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 23795) END FROM WidgetInst WHERE WidgetInstId = 23795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23826;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23828) END FROM WidgetInst WHERE WidgetInstId = 23828) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23829;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23828) END FROM WidgetInst WHERE WidgetInstId = 23828) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23832;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 23828) END FROM WidgetInst WHERE WidgetInstId = 23828) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23835;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 23795) END FROM WidgetInst WHERE WidgetInstId = 23795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23838;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 23795) END FROM WidgetInst WHERE WidgetInstId = 23795) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23840) END FROM WidgetInst WHERE WidgetInstId = 23840)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23843;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23842) END FROM WidgetInst WHERE WidgetInstId = 23842) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23846;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23842) END FROM WidgetInst WHERE WidgetInstId = 23842) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23847;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23842) END FROM WidgetInst WHERE WidgetInstId = 23842) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23850;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23842) END FROM WidgetInst WHERE WidgetInstId = 23842) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23851;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 23795) END FROM WidgetInst WHERE WidgetInstId = 23795) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23840) END FROM WidgetInst WHERE WidgetInstId = 23840)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23852;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23842) END FROM WidgetInst WHERE WidgetInstId = 23842) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23855;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23842) END FROM WidgetInst WHERE WidgetInstId = 23842) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23856;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23858) END FROM WidgetInst WHERE WidgetInstId = 23858) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23859;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23842) END FROM WidgetInst WHERE WidgetInstId = 23842) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23861;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23842) END FROM WidgetInst WHERE WidgetInstId = 23842) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23862;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 23858) END FROM WidgetInst WHERE WidgetInstId = 23858) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23863;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 23842) END FROM WidgetInst WHERE WidgetInstId = 23842) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23865;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 23842) END FROM WidgetInst WHERE WidgetInstId = 23842) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23866;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 23795) END FROM WidgetInst WHERE WidgetInstId = 23795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23867;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 23795) END FROM WidgetInst WHERE WidgetInstId = 23795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23870;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23907) END FROM WidgetInst WHERE WidgetInstId = 23907) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23908;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23907) END FROM WidgetInst WHERE WidgetInstId = 23907) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23910;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23907) END FROM WidgetInst WHERE WidgetInstId = 23907) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23912;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 23795) END FROM WidgetInst WHERE WidgetInstId = 23795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23914;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23927) END FROM WidgetInst WHERE WidgetInstId = 23927) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23928;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23927) END FROM WidgetInst WHERE WidgetInstId = 23927) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23930;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23927) END FROM WidgetInst WHERE WidgetInstId = 23927) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23932;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 23795) END FROM WidgetInst WHERE WidgetInstId = 23795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23934;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23951) END FROM WidgetInst WHERE WidgetInstId = 23951) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23952;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23951) END FROM WidgetInst WHERE WidgetInstId = 23951) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23954;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23951) END FROM WidgetInst WHERE WidgetInstId = 23951) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23956;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 23795) END FROM WidgetInst WHERE WidgetInstId = 23795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23958;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 23975) END FROM WidgetInst WHERE WidgetInstId = 23975) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23976;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 23975) END FROM WidgetInst WHERE WidgetInstId = 23975) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23978;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 23975) END FROM WidgetInst WHERE WidgetInstId = 23975) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23980;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23981) END FROM WidgetInst WHERE WidgetInstId = 23981) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 23975) END FROM WidgetInst WHERE WidgetInstId = 23975)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23982;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23981) END FROM WidgetInst WHERE WidgetInstId = 23981) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 23975) END FROM WidgetInst WHERE WidgetInstId = 23975)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23984;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 23981) END FROM WidgetInst WHERE WidgetInstId = 23981) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 23975) END FROM WidgetInst WHERE WidgetInstId = 23975)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23986;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 23795) END FROM WidgetInst WHERE WidgetInstId = 23795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23988;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 23990) END FROM WidgetInst WHERE WidgetInstId = 23990) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23991;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 23990) END FROM WidgetInst WHERE WidgetInstId = 23990) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23994;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 23990) END FROM WidgetInst WHERE WidgetInstId = 23990) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 23997;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 23990) END FROM WidgetInst WHERE WidgetInstId = 23990) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24008;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 23795) END FROM WidgetInst WHERE WidgetInstId = 23795) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24011;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 24018) END FROM WidgetInst WHERE WidgetInstId = 24018) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24019;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 24018) END FROM WidgetInst WHERE WidgetInstId = 24018) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24022;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 24018) END FROM WidgetInst WHERE WidgetInstId = 24018) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24025;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 24018) END FROM WidgetInst WHERE WidgetInstId = 24018) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24036;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 24040) END FROM WidgetInst WHERE WidgetInstId = 24040) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24041;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 24040) END FROM WidgetInst WHERE WidgetInstId = 24040) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24043;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 24040) END FROM WidgetInst WHERE WidgetInstId = 24040) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24045;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 24040) END FROM WidgetInst WHERE WidgetInstId = 24040) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24047;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 24040) END FROM WidgetInst WHERE WidgetInstId = 24040) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24049;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 24040) END FROM WidgetInst WHERE WidgetInstId = 24040) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24051;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 23795) END FROM WidgetInst WHERE WidgetInstId = 23795) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 18520) END FROM WidgetInst WHERE WidgetInstId = 18520)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24053;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 24055) END FROM WidgetInst WHERE WidgetInstId = 24055) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24056;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 24060;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 24060;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 24060;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 24060;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 24060;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 24060;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 24060) END FROM WidgetInst WHERE WidgetInstId = 24060) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24061;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 24063) END FROM WidgetInst WHERE WidgetInstId = 24063) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24064;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 24060) END FROM WidgetInst WHERE WidgetInstId = 24060) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24066;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24076;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24079;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 24060) END FROM WidgetInst WHERE WidgetInstId = 24060) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24082;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 24084) END FROM WidgetInst WHERE WidgetInstId = 24084) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24085;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 24084) END FROM WidgetInst WHERE WidgetInstId = 24084) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24088;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 24060) END FROM WidgetInst WHERE WidgetInstId = 24060) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24091;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 24093) END FROM WidgetInst WHERE WidgetInstId = 24093) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24094;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 24093) END FROM WidgetInst WHERE WidgetInstId = 24093) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24097;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 24093) END FROM WidgetInst WHERE WidgetInstId = 24093) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24100;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 24060) END FROM WidgetInst WHERE WidgetInstId = 24060) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24103;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 24060) END FROM WidgetInst WHERE WidgetInstId = 24060) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 24105) END FROM WidgetInst WHERE WidgetInstId = 24105)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24108;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 24107) END FROM WidgetInst WHERE WidgetInstId = 24107) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24111;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 24107) END FROM WidgetInst WHERE WidgetInstId = 24107) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24112;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 24107) END FROM WidgetInst WHERE WidgetInstId = 24107) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24115;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 24107) END FROM WidgetInst WHERE WidgetInstId = 24107) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24116;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 24060) END FROM WidgetInst WHERE WidgetInstId = 24060) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 24105) END FROM WidgetInst WHERE WidgetInstId = 24105)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24117;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 24107) END FROM WidgetInst WHERE WidgetInstId = 24107) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24120;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 24107) END FROM WidgetInst WHERE WidgetInstId = 24107) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24121;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 24123) END FROM WidgetInst WHERE WidgetInstId = 24123) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24124;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 24107) END FROM WidgetInst WHERE WidgetInstId = 24107) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24126;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 24107) END FROM WidgetInst WHERE WidgetInstId = 24107) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24127;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 24123) END FROM WidgetInst WHERE WidgetInstId = 24123) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24128;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 24107) END FROM WidgetInst WHERE WidgetInstId = 24107) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24130;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 24107) END FROM WidgetInst WHERE WidgetInstId = 24107) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24131;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 24060) END FROM WidgetInst WHERE WidgetInstId = 24060) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24132;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 24060) END FROM WidgetInst WHERE WidgetInstId = 24060) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24135;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24172) END FROM WidgetInst WHERE WidgetInstId = 24172) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24173;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24172) END FROM WidgetInst WHERE WidgetInstId = 24172) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24175;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24172) END FROM WidgetInst WHERE WidgetInstId = 24172) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24177;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 24060) END FROM WidgetInst WHERE WidgetInstId = 24060) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24179;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24192) END FROM WidgetInst WHERE WidgetInstId = 24192) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24193;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24192) END FROM WidgetInst WHERE WidgetInstId = 24192) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24195;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24192) END FROM WidgetInst WHERE WidgetInstId = 24192) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24197;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 24060) END FROM WidgetInst WHERE WidgetInstId = 24060) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24199;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24216) END FROM WidgetInst WHERE WidgetInstId = 24216) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24217;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24216) END FROM WidgetInst WHERE WidgetInstId = 24216) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24219;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24216) END FROM WidgetInst WHERE WidgetInstId = 24216) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24221;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 24060) END FROM WidgetInst WHERE WidgetInstId = 24060) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24223;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 24240) END FROM WidgetInst WHERE WidgetInstId = 24240) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24241;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 24240) END FROM WidgetInst WHERE WidgetInstId = 24240) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24243;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 24240) END FROM WidgetInst WHERE WidgetInstId = 24240) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24245;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24246) END FROM WidgetInst WHERE WidgetInstId = 24246) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 24240) END FROM WidgetInst WHERE WidgetInstId = 24240)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24247;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24246) END FROM WidgetInst WHERE WidgetInstId = 24246) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 24240) END FROM WidgetInst WHERE WidgetInstId = 24240)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24249;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24246) END FROM WidgetInst WHERE WidgetInstId = 24246) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 24240) END FROM WidgetInst WHERE WidgetInstId = 24240)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24251;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 24060) END FROM WidgetInst WHERE WidgetInstId = 24060) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24253;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 24255) END FROM WidgetInst WHERE WidgetInstId = 24255) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24256;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 24255) END FROM WidgetInst WHERE WidgetInstId = 24255) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24259;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 24255) END FROM WidgetInst WHERE WidgetInstId = 24255) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24262;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 24255) END FROM WidgetInst WHERE WidgetInstId = 24255) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24273;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 24060) END FROM WidgetInst WHERE WidgetInstId = 24060) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24276;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 24283) END FROM WidgetInst WHERE WidgetInstId = 24283) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24284;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 24283) END FROM WidgetInst WHERE WidgetInstId = 24283) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24287;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 24283) END FROM WidgetInst WHERE WidgetInstId = 24283) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24290;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 24283) END FROM WidgetInst WHERE WidgetInstId = 24283) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24301;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 24305) END FROM WidgetInst WHERE WidgetInstId = 24305) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24306;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 24305) END FROM WidgetInst WHERE WidgetInstId = 24305) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24308;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 24305) END FROM WidgetInst WHERE WidgetInstId = 24305) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24310;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 24305) END FROM WidgetInst WHERE WidgetInstId = 24305) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24312;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 24305) END FROM WidgetInst WHERE WidgetInstId = 24305) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24314;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 24305) END FROM WidgetInst WHERE WidgetInstId = 24305) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24316;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 24060) END FROM WidgetInst WHERE WidgetInstId = 24060) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 18520) END FROM WidgetInst WHERE WidgetInstId = 18520)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24318;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 24320) END FROM WidgetInst WHERE WidgetInstId = 24320) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24321;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 24325;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 24325;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 24325;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 24325;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 24325;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 24325;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 24325) END FROM WidgetInst WHERE WidgetInstId = 24325) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24326;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 24328) END FROM WidgetInst WHERE WidgetInstId = 24328) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24329;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 24325) END FROM WidgetInst WHERE WidgetInstId = 24325) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24331;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24341;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 18517) END FROM WidgetInst WHERE WidgetInstId = 18517) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24344;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 24325) END FROM WidgetInst WHERE WidgetInstId = 24325) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24347;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 24349) END FROM WidgetInst WHERE WidgetInstId = 24349) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24350;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 24349) END FROM WidgetInst WHERE WidgetInstId = 24349) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24353;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 24325) END FROM WidgetInst WHERE WidgetInstId = 24325) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24356;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 24358) END FROM WidgetInst WHERE WidgetInstId = 24358) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24359;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 24358) END FROM WidgetInst WHERE WidgetInstId = 24358) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24362;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 24358) END FROM WidgetInst WHERE WidgetInstId = 24358) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24365;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 24325) END FROM WidgetInst WHERE WidgetInstId = 24325) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24368;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 24325) END FROM WidgetInst WHERE WidgetInstId = 24325) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 24370) END FROM WidgetInst WHERE WidgetInstId = 24370)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24373;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 24372) END FROM WidgetInst WHERE WidgetInstId = 24372) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24376;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 24372) END FROM WidgetInst WHERE WidgetInstId = 24372) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24377;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 24372) END FROM WidgetInst WHERE WidgetInstId = 24372) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24380;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 24372) END FROM WidgetInst WHERE WidgetInstId = 24372) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24381;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 24325) END FROM WidgetInst WHERE WidgetInstId = 24325) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 24370) END FROM WidgetInst WHERE WidgetInstId = 24370)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24382;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 24372) END FROM WidgetInst WHERE WidgetInstId = 24372) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24385;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 24372) END FROM WidgetInst WHERE WidgetInstId = 24372) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24386;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 24388) END FROM WidgetInst WHERE WidgetInstId = 24388) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24389;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 24372) END FROM WidgetInst WHERE WidgetInstId = 24372) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24391;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 24372) END FROM WidgetInst WHERE WidgetInstId = 24372) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24392;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 24388) END FROM WidgetInst WHERE WidgetInstId = 24388) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24393;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 24372) END FROM WidgetInst WHERE WidgetInstId = 24372) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24395;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 24372) END FROM WidgetInst WHERE WidgetInstId = 24372) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24396;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 24325) END FROM WidgetInst WHERE WidgetInstId = 24325) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24397;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 24325) END FROM WidgetInst WHERE WidgetInstId = 24325) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24400;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24437) END FROM WidgetInst WHERE WidgetInstId = 24437) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24438;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24437) END FROM WidgetInst WHERE WidgetInstId = 24437) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24440;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24437) END FROM WidgetInst WHERE WidgetInstId = 24437) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24442;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 24325) END FROM WidgetInst WHERE WidgetInstId = 24325) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24444;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24457) END FROM WidgetInst WHERE WidgetInstId = 24457) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24458;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24457) END FROM WidgetInst WHERE WidgetInstId = 24457) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24460;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24457) END FROM WidgetInst WHERE WidgetInstId = 24457) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24462;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 24325) END FROM WidgetInst WHERE WidgetInstId = 24325) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24464;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24481) END FROM WidgetInst WHERE WidgetInstId = 24481) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24482;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24481) END FROM WidgetInst WHERE WidgetInstId = 24481) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24484;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24481) END FROM WidgetInst WHERE WidgetInstId = 24481) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24486;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 24325) END FROM WidgetInst WHERE WidgetInstId = 24325) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24488;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 24505) END FROM WidgetInst WHERE WidgetInstId = 24505) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24506;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 24505) END FROM WidgetInst WHERE WidgetInstId = 24505) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24508;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 24505) END FROM WidgetInst WHERE WidgetInstId = 24505) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24510;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24511) END FROM WidgetInst WHERE WidgetInstId = 24511) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 24505) END FROM WidgetInst WHERE WidgetInstId = 24505)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24512;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24511) END FROM WidgetInst WHERE WidgetInstId = 24511) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 24505) END FROM WidgetInst WHERE WidgetInstId = 24505)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24514;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 24511) END FROM WidgetInst WHERE WidgetInstId = 24511) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 24505) END FROM WidgetInst WHERE WidgetInstId = 24505)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24516;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 24325) END FROM WidgetInst WHERE WidgetInstId = 24325) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24518;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 24520) END FROM WidgetInst WHERE WidgetInstId = 24520) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24521;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 24520) END FROM WidgetInst WHERE WidgetInstId = 24520) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24524;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 24520) END FROM WidgetInst WHERE WidgetInstId = 24520) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24527;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 24520) END FROM WidgetInst WHERE WidgetInstId = 24520) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24538;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 24325) END FROM WidgetInst WHERE WidgetInstId = 24325) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24541;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 24548) END FROM WidgetInst WHERE WidgetInstId = 24548) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24549;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 24548) END FROM WidgetInst WHERE WidgetInstId = 24548) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24552;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 24548) END FROM WidgetInst WHERE WidgetInstId = 24548) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24555;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 24548) END FROM WidgetInst WHERE WidgetInstId = 24548) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24566;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 24570) END FROM WidgetInst WHERE WidgetInstId = 24570) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24571;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 24570) END FROM WidgetInst WHERE WidgetInstId = 24570) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24573;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 24570) END FROM WidgetInst WHERE WidgetInstId = 24570) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24575;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 24570) END FROM WidgetInst WHERE WidgetInstId = 24570) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24577;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 24570) END FROM WidgetInst WHERE WidgetInstId = 24570) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24579;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 24570) END FROM WidgetInst WHERE WidgetInstId = 24570) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24581;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 24325) END FROM WidgetInst WHERE WidgetInstId = 24325) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 18520) END FROM WidgetInst WHERE WidgetInstId = 18520)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24583;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 24585) END FROM WidgetInst WHERE WidgetInstId = 24585) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24586;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Restart File' AND WidgetInstId = 24611) END FROM WidgetInst WHERE WidgetInstId = 24611) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24612;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Initial Water Surface Elevation' AND WidgetInstId = 24611) END FROM WidgetInst WHERE WidgetInstId = 24611) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24614;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parabolic' AND WidgetInstId = 24619) END FROM WidgetInst WHERE WidgetInstId = 24619) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24620;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified Frequency' AND WidgetInstId = 24628) END FROM WidgetInst WHERE WidgetInstId = 24628) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24629;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified Times' AND WidgetInstId = 24628) END FROM WidgetInst WHERE WidgetInstId = 24628) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 24631;


# QueryDef

Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 0 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Mainland','Island','Levee outflow','River inflow') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Essential' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Levee outflow' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Levee' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Zero normal' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'None: cold start' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Linear bottom friction','Quadratic bottom friction','Hybrid nonlinear bottom friction') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Linear bottom friction' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Quadratic bottom friction','Hybrid nonlinear bottom friction') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Hybrid nonlinear bottom friction' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Quadratic friction nodal attribute - Fric' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mannings N nodal attribute - ManningsN' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Chezy C nodal attribute - ChezyFric' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Bottom roughness length - Z0b_var' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Baroclinic 3D' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'With wetting/drying' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM OrOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('No wetting/drying','With wetting/drying') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 0 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'None' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pure primitive equation: TAU0 specified' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Spatially discrete/time constant: TAU0 = -1' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Spatially variable/time constant: TAU0 = -2' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'From nodal attribute: TAU0 = -3' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'From local friction: TAU0 = -5' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value NOT IN ('Barotropic 2DDI using lumped GWCE (explicit)','Barotropic 3D using lumped GWCE (explicit)') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Barotropic 2DDI using lumped GWCE (explicit)','Barotropic 3D using lumped GWCE (explicit)') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('1','2','3','4','5','6','7','8') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('2','3','4','5','6','7','8') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('3','4','5','6','7','8') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('4','5','6','7','8') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('5','6','7','8') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('6','7','8') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('7','8') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '8' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Off' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM OrOperator WHERE A = (SELECT C FROM OrOperator WHERE A = (SELECT C FROM OrOperator WHERE A = (SELECT C FROM OrOperator WHERE A = (SELECT C FROM OrOperator WHERE A = (SELECT C FROM OrOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NetCDF' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NetCDF' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NetCDF' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NetCDF' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NetCDF' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NetCDF' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('NetCDF','NetCDF4') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('NWS =   10 - 10m Velocity/Pressure NWS AVN files','NWS =   11 - 10m Velocity/Pressure NWS ETA 29km files') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value NOT IN ('NWS =    0 - No Wind','NWS =   10 - 10m Velocity/Pressure NWS AVN files','NWS =   11 - 10m Velocity/Pressure NWS ETA 29km files','NWS =   12 - Velocity/Pressure OWI files') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value NOT IN ('NWS =    0 - No Wind','NWS =   10 - 10m Velocity/Pressure NWS AVN files','NWS =   11 - 10m Velocity/Pressure NWS ETA 29km files','NWS =   12 - Velocity/Pressure OWI files') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('NWS =    2 - Stress/Pressure - every node/time interval','NWS =    4 - Velocity/Pressure in PBL/JAG format','NWS =    5 - Velocity/Pressure - every node/time interval','NWS =   12 - Velocity/Pressure OWI files','NWS =   15 - HWind files','NWS =   16 - GFDL files') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 0 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('NWS =    1 - Stress/Pressure - every node/every timestep','NWS =    2 - Stress/Pressure - every node/time interval') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 0 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('NWS =    5 - Velocity/Pressure - every node/time interval','NWS =    4 - Velocity/Pressure in PBL/JAG format') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 0 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('NWS =    1 - Stress/Pressure - every node/every timestep','NWS =    2 - Stress/Pressure - every node/time interval','NWS =    4 - Velocity/Pressure in PBL/JAG format','NWS =    5 - Velocity/Pressure - every node/time interval') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value NOT IN ('NWS =    0 - No Wind','NWS =    1 - Stress/Pressure - every node/every timestep','NWS =    8 - Symmetric cyclonic storm from path','NWS =   11 - 10m Velocity/Pressure NWS ETA 29km files','NWS =   19 - Asymmetric cyclonic storm from path','NWS =   20 - GAHM Format cyclonic storm path') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NWS =   12 - Velocity/Pressure OWI files' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NWS =   12 - Velocity/Pressure OWI files' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('NWS =   15 - HWind files','NWS =   16 - GFDL files') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 0 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NWS =   15 - HWind files' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified central pressure' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NWS =   16 - GFDL files' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('NWS =    3 - Velocity in US Navy Fleet Numeric format','NWS =    6 - Velocity/Pressure on grid') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NWS =    3 - Velocity in US Navy Fleet Numeric format' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 0 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NWS =    6 - Velocity/Pressure on grid' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 0 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('NWS =    8 - Symmetric cyclonic storm from path','NWS =   19 - Asymmetric cyclonic storm from path','NWS =   20 - GAHM Format cyclonic storm path') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'NWS =   20 - GAHM Format cyclonic storm path' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'NWS =    0 - No Wind' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'SWAN coupled' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'None' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value NOT IN ('NWS =    0 - No Wind','NWS =    1 - Stress/Pressure - every node/every timestep','NWS =    2 - Stress/Pressure - every node/time interval') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'User defined' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Tidal constituents' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User specified' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Not used' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Not used' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Used' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 7 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value NOT IN ('Barotropic 2DDI','Barotropic 2DDI using lumped GWCE (explicit)') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 29 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 137 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 139 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 140 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 141 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 142 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 144 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 145 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 146 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 159 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 161 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 162 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 163 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 164 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 166 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 167 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 168 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Used' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 192 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 197 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 199 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 200 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 201 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 202 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 204 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 205 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'LeProvost' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 206 AND WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Flow' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mixed' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Aw' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rijn' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant Length' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Input Parameters' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Restart File' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Initial Water Surface Elevation' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parabolic' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified Frequency' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified Times' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Transient' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Half plane' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Use dataset' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'JONSWAP constant' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'JONSWAP dataset' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Manning constant' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Manning dataset' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Source terms and propagation' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Full plane' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Full plane' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Half plane' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Spectral coverage' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Spectral coverage' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Source terms and propagation' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant value' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant value' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Full plane' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 463 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Half plane' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Open lateral boundary' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Open lateral boundary' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 464 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 466 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Half plane' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Open lateral boundary' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Open lateral boundary' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 467 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 469 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Half plane' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Open lateral boundary' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Open lateral boundary' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 470 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Specified spectrum' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 472 AND WidgetInstId = ?;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Half plane' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Open lateral boundary' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != 'Open lateral boundary' AND WidgetInstId = ?) END FROM WidgetInst WHERE WidgetInstId = ?)) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 473 AND WidgetInstId = ?;


